//
//  EPOSBillHeadInfo.m
//  BCGenieEffect
//
//  Created by Ios Entity Generator on 2014-03-10 13:11:06
//  Copyright (c) 2014年 Bartosz Ciechanowski. All rights reserved.
//

#import "EPOSBillHeadInfo.h"

@implementation EPOSBillHeadInfo

+(id) getEPOSBillHeadInfoFromDictionary :(NSDictionary *) dic {
    EPOSBillHeadInfo * billHeadInfo = [[EPOSBillHeadInfo alloc]init] ;
//    billHeadInfo.CmtCasher = [dic objectForKey:@"CmtCasher"];
//    billHeadInfo.OOSRevDistrict = [dic objectForKey:@"OOSRevDistrict"];
//    billHeadInfo.OOSSendGoodsTime = [dic objectForKey:@"OOSSendGoodsTime"];
    billHeadInfo.IsTest = [dic objectForKey:@"IsTest"];
//    billHeadInfo.SaleID = [dic objectForKey:@"SaleID"];
//    billHeadInfo.OOSInvoiceType = [dic objectForKey:@"OOSInvoiceType"];
    billHeadInfo.TotalQty = [dic objectForKey:@"TotalQty"];
//    billHeadInfo.CashierCode = [dic objectForKey:@"CashierCode"];
//    billHeadInfo.OOSRevTel = [dic objectForKey:@"OOSRevTel"];
//    billHeadInfo.OOSRefErpID = [dic objectForKey:@"OOSRefErpID"];
//    billHeadInfo.BillBankDayCode = [dic objectForKey:@"BillBankDayCode"];
//    billHeadInfo.OOSBanggoGainRat = [dic objectForKey:@"OOSBanggoGainRat"];
    billHeadInfo.DiscountMoney = [dic objectForKey:@"DiscountMoney"];
    billHeadInfo.CashierTeamID = [dic objectForKey:@"CashierTeamID"];
//    billHeadInfo.SaleDate = [dic objectForKey:@"SaleDate"];
    billHeadInfo.CashierUserID = [dic objectForKey:@"CashierUserID"];
//    billHeadInfo.Change = [dic objectForKey:@"Change"];
//    billHeadInfo.IsOOS = [dic objectForKey:@"IsOOS"];
//    billHeadInfo.IsDelete = [dic objectForKey:@"IsDelete"];
//    billHeadInfo.O2OSaleType = [dic objectForKey:@"O2OSaleType"];
//    billHeadInfo.Selected = [dic objectForKey:@"Selected"];
//    billHeadInfo.OOSRevName = [dic objectForKey:@"OOSRevName"];
//    billHeadInfo.AssitantCashierUserID = [dic objectForKey:@"AssitantCashierUserID"];
//    billHeadInfo.OOSInvoiceContext = [dic objectForKey:@"OOSInvoiceContext"];
//    billHeadInfo.OOSSendGoodsRemark = [dic objectForKey:@"OOSSendGoodsRemark"];
    billHeadInfo.IsUpload = [dic objectForKey:@"IsUpload"];
//    billHeadInfo.OOSBanggoPrePay = [dic objectForKey:@"OOSBanggoPrePay"];
//    billHeadInfo.OOSShippingCode = [dic objectForKey:@"OOSShippingCode"];
//    billHeadInfo.OOSPayType = [dic objectForKey:@"OOSPayType"];
//    billHeadInfo.OOSRevCountry = [dic objectForKey:@"OOSRevCountry"];
    billHeadInfo.OrgCode = [dic objectForKey:@"OrgCode"];
//    billHeadInfo.Memo = [dic objectForKey:@"Memo"];
//    billHeadInfo.LinkSaleNo = [dic objectForKey:@"LinkSaleNo"];
//    billHeadInfo.SaleTypeName = [dic objectForKey:@"SaleTypeName"];
    billHeadInfo.VIPCode = [dic objectForKey:@"VIPCode"];
//    billHeadInfo.CmtSeller = [dic objectForKey:@"CmtSeller"];
//    billHeadInfo.OOSRevAddressEx = [dic objectForKey:@"OOSRevAddressEx"];
//    billHeadInfo.VIPID = [dic objectForKey:@"VIPID"];
//    billHeadInfo.OOSRevProvince = [dic objectForKey:@"OOSRevProvince"];
//    billHeadInfo.SaleNo = [dic objectForKey:@"SaleNo"];
//    billHeadInfo.CutMoney = [dic objectForKey:@"CutMoney"];
//    billHeadInfo.OOSExpsFee = [dic objectForKey:@"OOSExpsFee"];
//    billHeadInfo.OOSRevPost = [dic objectForKey:@"OOSRevPost"];
//    billHeadInfo.OOSShipping = [dic objectForKey:@"OOSShipping"];
//    billHeadInfo.VIPMobile = [dic objectForKey:@"VIPMobile"];
//    billHeadInfo.OOSRefErpNO = [dic objectForKey:@"OOSRefErpNO"];
//    billHeadInfo.PrintTime = [dic objectForKey:@"PrintTime"];
//    billHeadInfo.OOSRevCity = [dic objectForKey:@"OOSRevCity"];
//    billHeadInfo.InvoiceNo = [dic objectForKey:@"InvoiceNo"];
    billHeadInfo.TotalMoney = [dic objectForKey:@"TotalMoney"];
    billHeadInfo.VerID = [dic objectForKey:@"VerID"];
    billHeadInfo.OwnerOrgCode = [dic objectForKey:@"OwnerOrgCode"];
    billHeadInfo.DiscountRate = [dic objectForKey:@"DiscountRate"];
//    billHeadInfo.EntityState = [dic objectForKey:@"EntityState"];
//    billHeadInfo.OOSInvoiceTitle = [dic objectForKey:@"OOSInvoiceTitle"];
//    billHeadInfo.OOSExpsPayer = [dic objectForKey:@"OOSExpsPayer"];
//    billHeadInfo.CurrencyCode = [dic objectForKey:@"CurrencyCode"];
//    billHeadInfo.OOSRevAddress = [dic objectForKey:@"OOSRevAddress"];
    billHeadInfo.SaleType = [dic objectForKey:@"SaleType"];
//    billHeadInfo.RetailSaleID = [dic objectForKey:@"RetailSaleID"];
//    billHeadInfo.PrintNums = [dic objectForKey:@"PrintNums"];
    billHeadInfo.DiscountReason = [dic objectForKey:@"DiscountReason"];
    billHeadInfo.CashierID = [dic objectForKey:@"CashierID"];
    billHeadInfo.LocalTime = [dic objectForKey:@"LocalTime"];
    return billHeadInfo ;
}

+(NSMutableDictionary *) getDictionaryFromEPOSBillHeadInfo :(EPOSBillHeadInfo* ) billHeadInfo {
    NSMutableDictionary * dic = [[NSMutableDictionary alloc]init] ;
//    [dic setObject:billHeadInfo.CmtCasher forKey:@"CmtCasher"];
//    [dic setObject:billHeadInfo.OOSRevDistrict forKey:@"OOSRevDistrict"];
//    [dic setObject:billHeadInfo.OOSSendGoodsTime forKey:@"OOSSendGoodsTime"];
    [dic setObject:billHeadInfo.IsTest forKey:@"IsTest"];
//    [dic setObject:billHeadInfo.SaleID forKey:@"SaleID"];
//    [dic setObject:billHeadInfo.OOSInvoiceType forKey:@"OOSInvoiceType"];
    [dic setObject:billHeadInfo.TotalQty forKey:@"TotalQty"];
//    [dic setObject:billHeadInfo.CashierCode forKey:@"CashierCode"];
//    [dic setObject:billHeadInfo.OOSRevTel forKey:@"OOSRevTel"];
//    [dic setObject:billHeadInfo.OOSRefErpID forKey:@"OOSRefErpID"];
//    [dic setObject:billHeadInfo.BillBankDayCode forKey:@"BillBankDayCode"];
//    [dic setObject:billHeadInfo.OOSBanggoGainRat forKey:@"OOSBanggoGainRat"];
    [dic setObject:billHeadInfo.DiscountMoney forKey:@"DiscountMoney"];
    [dic setObject:billHeadInfo.CashierTeamID forKey:@"CashierTeamID"];
//    [dic setObject:billHeadInfo.SaleDate forKey:@"SaleDate"];
    if (billHeadInfo.CashierUserID != nil && ![billHeadInfo.CashierUserID isEqual:[NSNull null]]) {
        [dic setObject:billHeadInfo.CashierUserID forKey:@"CashierUserID"];
    }
    
//    [dic setObject:billHeadInfo.Change forKey:@"Change"];
//    [dic setObject:billHeadInfo.IsOOS forKey:@"IsOOS"];
//    [dic setObject:billHeadInfo.IsDelete forKey:@"IsDelete"];
//    [dic setObject:billHeadInfo.O2OSaleType forKey:@"O2OSaleType"];
//    [dic setObject:billHeadInfo.Selected forKey:@"Selected"];
//    [dic setObject:billHeadInfo.OOSRevName forKey:@"OOSRevName"];
//    [dic setObject:billHeadInfo.AssitantCashierUserID forKey:@"AssitantCashierUserID"];
//    [dic setObject:billHeadInfo.OOSInvoiceContext forKey:@"OOSInvoiceContext"];
//    [dic setObject:billHeadInfo.OOSSendGoodsRemark forKey:@"OOSSendGoodsRemark"];
    [dic setObject:billHeadInfo.IsUpload forKey:@"IsUpload"];
//    [dic setObject:billHeadInfo.OOSBanggoPrePay forKey:@"OOSBanggoPrePay"];
//    [dic setObject:billHeadInfo.OOSShippingCode forKey:@"OOSShippingCode"];
//    [dic setObject:billHeadInfo.OOSPayType forKey:@"OOSPayType"];
//    [dic setObject:billHeadInfo.OOSRevCountry forKey:@"OOSRevCountry"];
    [dic setObject:billHeadInfo.OrgCode forKey:@"OrgCode"];
//    [dic setObject:billHeadInfo.Memo forKey:@"Memo"];
//    [dic setObject:billHeadInfo.LinkSaleNo forKey:@"LinkSaleNo"];
//    [dic setObject:billHeadInfo.SaleTypeName forKey:@"SaleTypeName"];
    if (billHeadInfo.VIPCode!=nil) {
        [dic setObject:billHeadInfo.VIPCode forKey:@"VIPCode"];
    }
    
//    [dic setObject:billHeadInfo.CmtSeller forKey:@"CmtSeller"];
//    [dic setObject:billHeadInfo.OOSRevAddressEx forKey:@"OOSRevAddressEx"];
//    [dic setObject:billHeadInfo.VIPID forKey:@"VIPID"];
//    [dic setObject:billHeadInfo.OOSRevProvince forKey:@"OOSRevProvince"];
//    [dic setObject:billHeadInfo.SaleNo forKey:@"SaleNo"];
//    [dic setObject:billHeadInfo.CutMoney forKey:@"CutMoney"];
//    [dic setObject:billHeadInfo.OOSExpsFee forKey:@"OOSExpsFee"];
//    [dic setObject:billHeadInfo.OOSRevPost forKey:@"OOSRevPost"];
//    [dic setObject:billHeadInfo.OOSShipping forKey:@"OOSShipping"];
//    [dic setObject:billHeadInfo.VIPMobile forKey:@"VIPMobile"];
//    [dic setObject:billHeadInfo.OOSRefErpNO forKey:@"OOSRefErpNO"];
//    [dic setObject:billHeadInfo.PrintTime forKey:@"PrintTime"];
//    [dic setObject:billHeadInfo.OOSRevCity forKey:@"OOSRevCity"];
//    [dic setObject:billHeadInfo.InvoiceNo forKey:@"InvoiceNo"];
    [dic setObject:billHeadInfo.TotalMoney forKey:@"TotalMoney"];
    [dic setObject:billHeadInfo.VerID forKey:@"VerID"];
    [dic setObject:billHeadInfo.OwnerOrgCode forKey:@"OwnerOrgCode"];
    if (billHeadInfo.DiscountRate!=nil) {
        [dic setObject:billHeadInfo.DiscountRate forKey:@"DiscountRate"];
    }

//    [dic setObject:billHeadInfo.EntityState forKey:@"EntityState"];
//    [dic setObject:billHeadInfo.OOSInvoiceTitle forKey:@"OOSInvoiceTitle"];
//    [dic setObject:billHeadInfo.OOSExpsPayer forKey:@"OOSExpsPayer"];
//    [dic setObject:billHeadInfo.CurrencyCode forKey:@"CurrencyCode"];
//    [dic setObject:billHeadInfo.OOSRevAddress forKey:@"OOSRevAddress"];
    [dic setObject:billHeadInfo.SaleType forKey:@"SaleType"];
//    [dic setObject:billHeadInfo.RetailSaleID forKey:@"RetailSaleID"];
//    [dic setObject:billHeadInfo.PrintNums forKey:@"PrintNums"];
    if (billHeadInfo.DiscountReason != nil) {
        [dic setObject:billHeadInfo.DiscountReason forKey:@"DiscountReason"];
    }
    
    [dic setObject:billHeadInfo.CashierID forKey:@"CashierID"];
    [dic setObject:billHeadInfo.LocalTime forKey:@"LocalTime"];
    return dic ;
}

@end